<?php
/*
 * 手机客户端 用户信息修改
 * 2013-12-14
 */
include "inc/public_header.php";

include "func/user.php";				//用户信息处理函数

//获取用户信息
$uInfoArr = user_getInfoFromUUID();
if(!$uInfoArr){
	echo json_encode(array(
		 "success"=>"0"
		,"errCode"=>"0"
		,"msg"=>"没有获取到用户信息"
		,"uuid"=>$_REQUEST["uuid"]));
	die;
}
$uid = $uInfoArr["uid"]; //用户信息主键


//图片根路径
$BASE_UPLOAD_PATH = "/img1/uploads/zjl/"; 
//图片显示根路径
$SHOW_IMG_BASE_URL = "http://www.chinalaohu.com/img1/uploads/zjl/";

//活动代码，默认为普通秀场活动

$realName 		= $_REQUEST["realName"];		//真实姓名
$sex 			= $_REQUEST["sex"];				//性别
$birthday 		= $_REQUEST["birthday"];		//生日
$cardType		= $_REQUEST["cardType"];		//证件类型
$cardNumber 	= $_REQUEST["cardNumber"];		//号码
$email 			= $_REQUEST["email"];			//邮箱


if(!isset($realName)){
	echo json_encode(array("success"=>"0","errCode"=>"0","msg"=>"真实姓名"));
	die;
}
if(!isset($sex)){
	$sex = "0";
	die;
}

if(!isset($birthday)){
	$birthday = "";
	die;
}
if(!isset($cardType)){
	$cardType = "0";
	die;
}
if(!isset($cardNumber)){
	$cardNumber = "0";
	die;
}
if(!isset($email)){
	$email = "";
	die;
}

$sql = "update user_base set realName='".$realName."',sex='".$sex."',birthday='".$birthday."',idtype='".$cardType."',idnumber='".$cardNumber."',email='"$email"' where uid='".$uid."'";
$db->query($sql);


if($uploadOK){
	echo json_encode(array(
		 "success"=>"1"
		,"msg"=>"上传成功"));
}else{
	echo json_encode(array("success"=>"0","msg"=>"没有获取到文件"));
}
die;
?>